

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    
    <title>pyamp.web.http.constants &mdash; pyamp v1.2 documentation</title>
    <link rel="stylesheet" href="../../../../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../../../../_static/pygments.css" type="text/css" />
    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
        URL_ROOT:    '../../../../',
        VERSION:     '1.2',
        COLLAPSE_INDEX: false,
        FILE_SUFFIX: '.html',
        HAS_SOURCE:  true
      };
    </script>
    <script type="text/javascript" src="../../../../_static/jquery.js"></script>
    <script type="text/javascript" src="../../../../_static/underscore.js"></script>
    <script type="text/javascript" src="../../../../_static/doctools.js"></script>
    <link rel="top" title="pyamp v1.2 documentation" href="../../../../index.html" />
    <link rel="up" title="Module code" href="../../../index.html" /> 
  </head>
  <body>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../../genindex.html" title="General Index"
             accesskey="I">index</a></li>
        <li class="right" >
          <a href="../../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="../../../../index.html">pyamp v1.2 documentation</a> &raquo;</li>
          <li><a href="../../../index.html" accesskey="U">Module code</a> &raquo;</li> 
      </ul>
    </div>  

    <div class="document">
      <div class="documentwrapper">
        <div class="bodywrapper">
          <div class="body">
            
  <h1>Source code for pyamp.web.http.constants</h1><div class="highlight"><pre>
<span class="c"># Copyright 2012 Brett Ponsler</span>
<span class="c"># This file is part of pyamp.</span>
<span class="c">#</span>
<span class="c"># pyamp is free software: you can redistribute it and/or modify</span>
<span class="c"># it under the terms of the GNU General Public License as published by</span>
<span class="c"># the Free Software Foundation, either version 3 of the License, or</span>
<span class="c"># (at your option) any later version.</span>
<span class="c">#</span>
<span class="c"># pyamp is distributed in the hope that it will be useful,</span>
<span class="c"># but WITHOUT ANY WARRANTY; without even the implied warranty of</span>
<span class="c"># MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span>
<span class="c"># GNU General Public License for more details.</span>
<span class="c">#</span>
<span class="c"># You should have received a copy of the GNU General Public License</span>
<span class="c"># along with pyamp.  If not, see &lt;http://www.gnu.org/licenses/&gt;.</span>
<span class="sd">&#39;&#39;&#39;The constants module contains classes which define constants relating</span>
<span class="sd">to HTTP data.</span>

<span class="sd">&#39;&#39;&#39;</span>


<div class="viewcode-block" id="HeaderIds"><a class="viewcode-back" href="../../../../web.html#pyamp.web.http.constants.HeaderIds">[docs]</a><span class="k">class</span> <span class="nc">HeaderIds</span><span class="p">:</span>
    <span class="sd">&#39;&#39;&#39;The HeaderIds class contains constants pertaining to header</span>
<span class="sd">    identifiers.</span>

<span class="sd">    &#39;&#39;&#39;</span>
    <span class="c"># @todo: define the rest of the header ids</span>

    <span class="n">ContentType</span> <span class="o">=</span> <span class="s">&quot;Content-Type&quot;</span>
    <span class="sd">&#39;&#39;&#39;The content type header id.&#39;&#39;&#39;</span>

    <span class="n">Location</span> <span class="o">=</span> <span class="s">&quot;Location&quot;</span>
    <span class="sd">&#39;&#39;&#39;The location header id.&#39;&#39;&#39;</span>

    <span class="n">UserAgent</span> <span class="o">=</span> <span class="s">&quot;User-Agent&quot;</span>
    <span class="sd">&#39;&#39;&#39;The user agent header id.&#39;&#39;&#39;</span>

</div>
<div class="viewcode-block" id="StatusCodes"><a class="viewcode-back" href="../../../../web.html#pyamp.web.http.constants.StatusCodes">[docs]</a><span class="k">class</span> <span class="nc">StatusCodes</span><span class="p">:</span>
    <span class="sd">&#39;&#39;&#39;The StatusCodes class contains constants pertaining to</span>
<span class="sd">    HTTP status codes.</span>

<span class="sd">    &#39;&#39;&#39;</span>
    <span class="c"># @todo: add the rest of the status codes</span>
    <span class="c"># http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html</span>
    <span class="n">OK</span> <span class="o">=</span> <span class="mi">202</span>
    <span class="sd">&#39;&#39;&#39;The OK status code.&#39;&#39;&#39;</span>

    <span class="n">MovedPermanently</span> <span class="o">=</span> <span class="mi">301</span>
    <span class="sd">&#39;&#39;&#39;The moved permanently status code.&#39;&#39;&#39;</span>

    <span class="n">Found</span> <span class="o">=</span> <span class="mi">302</span>
    <span class="sd">&#39;&#39;&#39;The found status code.&#39;&#39;&#39;</span>

    <span class="n">FileNotFound</span> <span class="o">=</span> <span class="mi">404</span>
    <span class="sd">&#39;&#39;&#39;The file not found status code.&#39;&#39;&#39;</span>

    <span class="n">InternalServerError</span> <span class="o">=</span> <span class="mi">500</span>
    <span class="sd">&#39;&#39;&#39;The internal server error status code.&#39;&#39;&#39;</span>

</div>
<div class="viewcode-block" id="ContentTypes"><a class="viewcode-back" href="../../../../web.html#pyamp.web.http.constants.ContentTypes">[docs]</a><span class="k">class</span> <span class="nc">ContentTypes</span><span class="p">:</span>
    <span class="sd">&#39;&#39;&#39;The ContentTypes class contains constants pertaining to</span>
<span class="sd">    different types of content.</span>

<span class="sd">    &#39;&#39;&#39;</span>
    <span class="n">Bmp</span> <span class="o">=</span> <span class="s">&quot;image/bmp&quot;</span>
    <span class="sd">&#39;&#39;&#39;A BMP image content.&#39;&#39;&#39;</span>

    <span class="n">Gif</span> <span class="o">=</span> <span class="s">&quot;image/png&quot;</span>
    <span class="sd">&#39;&#39;&#39;A GIF image content.&#39;&#39;&#39;</span>

    <span class="n">Ico</span> <span class="o">=</span> <span class="s">&quot;image/ico&quot;</span>
    <span class="sd">&#39;&#39;&#39;An ICO image content.&#39;&#39;&#39;</span>

    <span class="n">Png</span> <span class="o">=</span> <span class="s">&quot;image/png&quot;</span>
    <span class="sd">&#39;&#39;&#39;An PNG image content.&#39;&#39;&#39;</span>

    <span class="n">TextHtml</span> <span class="o">=</span> <span class="s">&quot;text/html&quot;</span>
    <span class="sd">&#39;&#39;&#39;Standard text HTML content.&#39;&#39;&#39;</span>

    <span class="n">Json</span> <span class="o">=</span> <span class="s">&quot;application/json&quot;</span>
    <span class="sd">&#39;&#39;&#39;JSON content.&#39;&#39;&#39;</span>

</div>
<div class="viewcode-block" id="OperatingSystems"><a class="viewcode-back" href="../../../../web.html#pyamp.web.http.constants.OperatingSystems">[docs]</a><span class="k">class</span> <span class="nc">OperatingSystems</span><span class="p">:</span>
    <span class="sd">&#39;&#39;&#39;The OperatingSystems class contains constants pertaining to</span>
<span class="sd">    the strings used to identify various operating systems.</span>

<span class="sd">    &#39;&#39;&#39;</span>
    <span class="n">Windows3_11</span> <span class="o">=</span> <span class="s">&quot;Windows 3.11&quot;</span>
    <span class="sd">&#39;&#39;&#39;The Windows 3.11 OS.&#39;&#39;&#39;</span>

    <span class="n">Windows95</span> <span class="o">=</span> <span class="s">&quot;Windows 95&quot;</span>
    <span class="sd">&#39;&#39;&#39;The Windows 95 OS.&#39;&#39;&#39;</span>

    <span class="n">Windows98</span> <span class="o">=</span> <span class="s">&quot;Windows 98&quot;</span>
    <span class="sd">&#39;&#39;&#39;The Windows 98 OS.&#39;&#39;&#39;</span>

    <span class="n">Windows2000</span> <span class="o">=</span> <span class="s">&quot;Windows 2000&quot;</span>
    <span class="sd">&#39;&#39;&#39;The Windows 2000 OS.&#39;&#39;&#39;</span>

    <span class="n">WindowsXP</span> <span class="o">=</span> <span class="s">&quot;Windows XP&quot;</span>
    <span class="sd">&#39;&#39;&#39;The Windows XP OS.&#39;&#39;&#39;</span>

    <span class="n">WindowsServer2003</span> <span class="o">=</span> <span class="s">&quot;Windows Server 2003&quot;</span>
    <span class="sd">&#39;&#39;&#39;The Windows Server 2003 OS.&#39;&#39;&#39;</span>

    <span class="n">WindowsVista</span> <span class="o">=</span> <span class="s">&quot;Windows Vista&quot;</span>
    <span class="sd">&#39;&#39;&#39;The Windows Vista OS.&#39;&#39;&#39;</span>

    <span class="n">Windows7</span> <span class="o">=</span> <span class="s">&quot;Windows 7&quot;</span>
    <span class="sd">&#39;&#39;&#39;The Windows 7 OS.&#39;&#39;&#39;</span>

    <span class="n">WindowsNT4</span> <span class="o">=</span> <span class="s">&quot;Windows NT 4.0&quot;</span>
    <span class="sd">&#39;&#39;&#39;The Windows NT 4.0 OS.&#39;&#39;&#39;</span>

    <span class="n">WindowsME</span> <span class="o">=</span> <span class="s">&quot;Windows ME&quot;</span>
    <span class="sd">&#39;&#39;&#39;The Windows ME OS.&#39;&#39;&#39;</span>

    <span class="n">OpenBSD</span> <span class="o">=</span> <span class="s">&quot;Open BSD&quot;</span>
    <span class="sd">&#39;&#39;&#39;The OpenBSD OS.&#39;&#39;&#39;</span>

    <span class="n">SunOS</span> <span class="o">=</span> <span class="s">&quot;Sun OS&quot;</span>
    <span class="sd">&#39;&#39;&#39;The Sun OS OS.&#39;&#39;&#39;</span>

    <span class="n">Linux</span> <span class="o">=</span> <span class="s">&quot;Linux&quot;</span>
    <span class="sd">&#39;&#39;&#39;The Linux OS.&#39;&#39;&#39;</span>

    <span class="n">MacOS</span> <span class="o">=</span> <span class="s">&quot;Mac OS&quot;</span>
    <span class="sd">&#39;&#39;&#39;The Mac OS.&#39;&#39;&#39;</span>

    <span class="n">QNX</span> <span class="o">=</span> <span class="s">&quot;QNX&quot;</span>
    <span class="sd">&#39;&#39;&#39;The QNX OS.&#39;&#39;&#39;</span>

    <span class="n">BeOS</span> <span class="o">=</span> <span class="s">&quot;BeOS&quot;</span>
    <span class="sd">&#39;&#39;&#39;The BeOS OS.&#39;&#39;&#39;</span>

    <span class="n">OS2</span> <span class="o">=</span> <span class="s">&quot;OS/2&quot;</span>
    <span class="sd">&#39;&#39;&#39;The OS/2 OS.&#39;&#39;&#39;</span>

    <span class="n">SearchBot</span> <span class="o">=</span> <span class="s">&quot;Search Bot&quot;</span>
    <span class="sd">&#39;&#39;&#39;The SearchBot OS.&#39;&#39;&#39;</span></div>
</pre></div>

          </div>
        </div>
      </div>
      <div class="sphinxsidebar">
        <div class="sphinxsidebarwrapper">
<div id="searchbox" style="display: none">
  <h3>Quick search</h3>
    <form class="search" action="../../../../search.html" method="get">
      <input type="text" name="q" size="18" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    <p class="searchtip" style="font-size: 90%">
    Enter search terms or a module, class or function name.
    </p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
      <div class="clearer"></div>
    </div>
    <div class="related">
      <h3>Navigation</h3>
      <ul>
        <li class="right" style="margin-right: 10px">
          <a href="../../../../genindex.html" title="General Index"
             >index</a></li>
        <li class="right" >
          <a href="../../../../py-modindex.html" title="Python Module Index"
             >modules</a> |</li>
        <li><a href="../../../../index.html">pyamp v1.2 documentation</a> &raquo;</li>
          <li><a href="../../../index.html" >Module code</a> &raquo;</li> 
      </ul>
    </div>
    <div class="footer">
        &copy; Copyright 2012, Brett Ponsler.
      Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.0.1.
    </div>
  </body>
</html>